package com.ruoyi;

import com.dtflys.forest.springboot.annotation.ForestScan;
import com.minglv.mini.tools.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

import java.net.Inet4Address;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@ComponentScan({ "com.ruoyi.*", "com.minglv.mini.*" })
@ForestScan(basePackages = "com.minglv.mini.apiclient")
@Slf4j
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        try {
            // System.setProperty("spring.devtools.restart.enabled", "false");
            SpringApplication.run(RuoYiApplication.class, args);
            System.out.println("(♥◠‿◠)ﾉﾞ  名律堂服务项目启动成功 》》》》》》》》》》  ლ(´ڡ`ლ)ﾞ  \n" +
                    " .-------.       ____     __        \n" +
                    " |  _ _   \\      \\   \\   /  /    \n" +
                    " | ( ' )  |       \\  _. /  '       \n" +
                    " |(_ o _) /        _( )_ .'         \n" +
                    " | (_,_).' __  ___(_ o _)'          \n" +
                    " |  |\\ \\  |  ||   |(_,_)'         \n" +
                    " |  | \\ `'   /|   `-'  /           \n" +
                    " |  |  \\    /  \\      /           \n" +
                    " ''-'   `'-'    `-..-'              ");
            String hostAddress = Inet4Address.getLocalHost().getHostAddress();
            //获取端口号
            String port = "6808";
////            String ip = " http://" + hostAddress + ":" + port + "/swagger-ui.html";
//            log.info(ip);
            String doc = " http://" + hostAddress + ":" + port + "/doc.html";
            log.info(doc);
            log.info("名律堂服务项目服务启动了,时间 :" + DateUtil.now());
        } catch (Exception e) {
            log.error("启动异常", e);
        }

    }
}
